Repository navigation
RichText: Format boundaries without DOM - #13697
Merged
Merged
Conversation
ellatrix
requested review from
Soean,
aduth,
ajitbohra,
gziolo,
jorgefilipecosta,
nerrad,
noisysocks,
ntwb,
oandregal and
talldan
as code owners
February 6, 2019 12:41
youknowriad
pushed a commit
that referenced
this pull request
Mar 6, 2019
* Avoid flickering by setting boundary class when creating the DOM tree * Remove TinyMCE boundaries * Remove TinyMCE so it doesn't interfere with our boundaries * Fix failing unit tests * Only have one boundary class at a time * Remove filterString param * Build in own padding and boundary classes * Update styling * valueToFormat shouldn't create editable tree * Add zero with spaces around formatting * Remove old boundary compatibility code * Update dom diff, prevent browser selection overwrite on boundary * Update UI * Fix inserting format with shortcut * Add check * Remove nbsp inserted by TinyMCE from test * Do not mutate attirbutes object * Fix link e2e tests * WIP * WIP: try boundaries without DOM * Remove zero width space everywhere * Fix e2e tests * Clean up * Revert selection snapshots * Correctly remove dependencies * Add nested boundary test * Add backtick test * Fix annotation tests: they now have boundaries * Merge logic * Fix getActiveFormat test * Update some docs and dependencies * Fix block CSS * Return focus to editable after pressing format button * Update docs * Update changelogs * Add changelog headings * Remove obsolete onFocus class method from Editable * Restore :focus * Update TinyMCE mentions * Use Escape instead of mouse move * Update isHorizontalEdge comment * Add docs for fromFormat * Create test content manually
This was referenced May 13, 2019
This was referenced Apr 30, 2020
desrosj
added a commit
to desrosj/gutenberg
that referenced
this pull request
Oct 20, 2026
`undo › should undo typing after non input change` types "after keyboard" into a bold format and compares the post content with a snapshot. The snapshot has a non-breaking space between the two words, but this branch's rich text now produces a regular space, so the snapshot never matches. `trunk` updated the same snapshot to a regular space in WordPress#13697, which changed how format boundaries are handled. Do the same here. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SRW6hV7j7bc8cxt2LUbPJt
desrosj
added a commit
to desrosj/gutenberg
that referenced
this pull request
Oct 20, 2026
`undo › should undo typing after non input change` types "after keyboard" into a bold format and compares the post content with a snapshot. The snapshot has a non-breaking space between the two words, but this branch's rich text now produces a regular space, so the snapshot never matches. `trunk` updated the same snapshot to a regular space in WordPress#13697, which changed how format boundaries are handled. Do the same here. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SRW6hV7j7bc8cxt2LUbPJt
desrosj
added a commit
to desrosj/gutenberg
that referenced
this pull request
Oct 21, 2026
`undo › should undo typing after non input change` types "after keyboard" into a bold format and compares the post content with a snapshot. The snapshot has a non-breaking space between the two words, but this branch's rich text now produces a regular space, so the snapshot never matches. `trunk` updated the same snapshot to a regular space in WordPress#13697, which changed how format boundaries are handled. Do the same here. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SRW6hV7j7bc8cxt2LUbPJt
desrosj
added a commit
to desrosj/gutenberg
that referenced
this pull request
Oct 26, 2026
`undo › should undo typing after non input change` types "after keyboard" into a bold format and compares the post content with a snapshot. The snapshot has a non-breaking space between the two words, but this branch's rich text now produces a regular space, so the snapshot never matches. `trunk` updated the same snapshot to a regular space in WordPress#13697, which changed how format boundaries are handled. Do the same here. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SRW6hV7j7bc8cxt2LUbPJt
This was referenced Oct 26, 2026
Merged
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR adds boundary logic to the Rich Text package. Every format will now have boundaries, not just some registered element tags.
Fixes 10 known bugs: closes #13153, closes #12973, closes #12978, closes #11091, closes #11178, closes #11276, closes #12529, closes #11741, closes #11423, closes #11812.
How has this been tested?
See e2e.
Screenshots
Types of changes
Checklist: